package prisd.brand.com.base64;

import java.util.Arrays;

import javax.crypto.spec.SecretKeySpec;

/**
 * Created by igaocx on 2019/1/10.
 */
public class Test1 {
    public static void main(String[] args) {
//        test1();

    }
    private static void test1(){
        String jsonData = "13ed457a49931224dc6dc20fd71ac7f4";
        try {
            SecretKeySpec localSecretKeySpec = new SecretKeySpec(jsonData.getBytes("UTF-8"), 0, jsonData.getBytes("UTF-8").length, "AES");
            byte[] encoded = localSecretKeySpec.getEncoded();
            System.out.println("getEncoded(): "+Arrays.toString(encoded));
            //第一次运行：getEncoded(): [49, 51, 101, 100, 52, 53, 55, 97, 52, 57, 57, 51, 49, 50, 50, 52, 100, 99, 54, 100, 99, 50, 48, 102, 100, 55, 49, 97, 99, 55, 102, 52]
            //第二次运行：getEncoded(): [49, 51, 101, 100, 52, 53, 55, 97, 52, 57, 57, 51, 49, 50, 50, 52, 100, 99, 54, 100, 99, 50, 48, 102, 100, 55, 49, 97, 99, 55, 102, 52]
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
